<%-- $Id: artistList.jsp 247 2007-03-06 09:22:12Z huijzer $ --%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<html>

	<head>
		<title>Artist :: List</title>
		<meta name="object" content="artist">
	</head>

	<body>

		<div id="apphead">
			<h2>Artist :: <em>List</em></h2>
		</div>

		<div id="projecthome" class="app">

			<div class="tabs" id="tabs">
				<table cellpadding="3" cellspacing="0" border="0">
					<tr>
						<c:choose>
							<c:when test="${'1' == param.start}">
								<th>1-9</th>	
							</c:when>
							<c:otherwise>
								<td><a href="<c:url value="/admin/artistList.action?start=1"/>">1-9</a></td>
							</c:otherwise>
						</c:choose>
						<c:forTokens items="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z" delims="," var="letter">
							<c:choose>
								<c:when test="${letter == param.start}">
									<th>${fn:toUpperCase(letter)}</th>	
								</c:when>
								<c:otherwise>
									<td><a href="<c:url value="/admin/artistList.action?start=${letter}"/>">${fn:toUpperCase(letter)}</a></td>
								</c:otherwise>
							</c:choose>
						</c:forTokens>
					</tr>
				</table>
			</div>
			
			<table border="1" cellspacing="2" cellpadding="3" width="100%">
				<tr>
					<th>Name</th>
					<th>Actions</th>
				</tr>
				<c:forEach items="${list}" var="artist" varStatus="status">
					<tr class="${status.count % 2 == 0 ? 'b' : 'a'}">
						<td>
							<a href="<c:url value="/admin/artistDisplay.action?id=${artist.id}"/>">${artist.name}</a>
						</td>
						<td>
							<a href="<c:url value="/admin/artistEdit.action?id=${artist.id}"/>">edit</a>
							<a href="<c:url value="/admin/artistExport.action?id=${artist.id}"/>">export</a>
						</td>
					</tr>
				</c:forEach>
			</table>

		</div>

	</body>

</html>
